CalculateSizeCM 1.2
Copyright © 2003 Hide Itoh <hide@pixture.com> All rights reserved.
PIXTURE STUDIO <http://www.pixture.com>

What is CalculateSizeCM ?

CalculateSizeCM is a contextual menu plugin for Mac OS X. It let you calculate the total size of selected files/folders at the Finder. It's specially usuful if you want to know the total size of mutilple files and folders (for example, to see if they fit in a CD-R media or not). This is the OS X port of my Calculate Size CMM plugin. 

Features

• It can calculate the total size of selected folders and files easily. 
• It displays the progress information while calculating.
• It displays more detail information like number of files, invisible files, folders, fork sizes...
• You can cancel the operation any time during the calculation.
• Currently, it supports English and Japanese localization.

Difference from Finder's Get Info

As you know, Mac OS X Finder's Get Info can calculate the total size of multiple items, but it does not show detail information. For example, if you select two folders and do the Get Info, you will know the total size but not number of files and folders inside of those two folders. Finder's get info just shows number of directly selected items and total size, no other information like fork sizes, number of files/folders invisible items inside.

Also, when you select a folder with tons of files and sub folders in it, Finder's Get Info just shows 'Calculating Size' until it finish calculation, while CalculateSizeCM shows progressive display so you can see the size so far even if you cancel the operation in the middle. This may be helpfiul when you want to see if a folder is smaller than 700MB before writing to CD-R because once you see it goes over 700MB, you can cancel the operation easily and do not have to wait for the end of calculation, which you can not do with Finder's Get Info dialog.

One thing that CalculateSizeCM can not do is getting the size of a volume instantly. Finder's Get Info can do this. Since CalculateSizeCM is designed to counts/calculates the number of files/folders and other information, it would take a lot of time to calculate a entire volume. If you just want to know the volume's total size and remaining free space, use Finder's Get Info. 

Installation

For your convenicence, simple AppleScript to install the CalculateSizeCM is enclosed. Just run the 'InstallCalculateSizeCM' script to install and follow the direction on the screen. 

You can manually install the CalculateSizeCM by copying 'CalculateSizeCM.plugin' package to either '/Library/Contextual Menu Items' folder or '~/Library/Contextual Menu Items' folder.  If you don't have '~/Library/Contextual Menu Items' folder, simply create a new folder and copy it there. In this case, you need to either restart computer, or logout and login again, or restart the Finder to use the CalculateSizeCM.

How to use ?

Choose file(s)/folder(s)/volume(s) at the Finder and Control+Click the mouse to bring up the contextual menu. You will see 'Calculate Size...' contextual menu item. So select this 'Calculate Size...' menu item.

¨

Then, the following dialog will appear on the screen and start calculating size,

¨

Total Size		Total logical size of the selected items

Disk Size		This is the total block size that selected items occupies in the current volume. 
			Disk size may differ even for the same files depending the node size of the disk

File Size		Total number of files including invisible files and the number of invisible files
			(Note: invisible file and dot file may not be necessary to be the same)

Folder Size	Total number of folders including invisible folders and the number of invisible folders
			(Note: packages are counted as folders since they are actually folders)

Current Level	Current searching directory tree level and the max (deepest level). 
			It starting from 0 and the number increase as it goes to deeper level.

Data Fork		Total logical size of the data fork of the selected items

Rsrc Fork		Total logical size of the resource fork of the selected items

Canceling the operation

If you want to cancel the calculation in the middle, just click the 'Cancel' button, or press 'ESC' key or press 'Control+Period' key from the keyboard. 

Expand mode

By clicking on the triangle arrow on the dialog anytime (during the calculation, or after the calculation is completed), you can use the expand mode of CalculateSizeCM. The dialog is expanded and displays the addtional information, breakdown of the total size by data fork and resource fork.

It would be useful for calculating size of all the GIF and JPEG files without thumbnail icons and other resources before uploading them to your WWW server. 

Tips to increase the calculation speed

You can increase the calculation speed by setting the progress information display mode to OFF.
Since CalculationSizeCM show the progress of calculation, it slows down the calculation time. If you calculate volume or folder with huge number of files/sub folders, it's recommended that you click the magnifier glass icon and change to the fast more. Under the fast mode, the progress display is not displayed. You can click the magnifier icon to switch fast mode and progress (slow) mode back and forth.

In addition, using expand mode during the calculation also slows downs the performance.  I recommend that you do not expand until the calculation is done.

NOTE

To make the calculation time as quick as possible, you can not move the dialog during the calculation. You can move the dialog once the calculation is completed or canceled.

Aliases are not resolved for the calculation in order to avoid the endless loop (deadlock) caused by looped aliases.
Thereofre, alias is calculated as a small file (usually less than 1KB).

Unlike my Calculate Size CMM plugin for Classic Mac OS, this CM plugin is not really fast (kinda slow) even if you use the fast mode. This is because of the Mac OS X's real multitasking mechanism. Under Mac OS X, Finder is just one of many other apps and can not use most of the processor time, and that's why the CalculateSizeCM does the job slow.  However, the good thing is that you can switch to other application and keep working on it while CalculateSizeCM is running under the Finder. So I think it's pros and cons ;-)

Version history

1.0	(4/6/2003)
	• First release - this is my first Mac OS X program :-) so I know it needs some improvements.

1.1	never released to public

1.2	(5/25/2003)
	• Fixed a bug that miscalculate files bigger than 2GB
	• Fixed some minor bugs and deleted debug console message
	• Added current level and max level display
	• Changed the icon of the plugin.

Copyright and info. about freeware distribution

CalculateSizeCM is copyright ©2003 by Hide Itoh <hide@pixture.com>.  Hide Itoh asserts the right to be identified as author and has provided this software as a freeware. CalculateSizeCM is developed using Abracode Inc's Contextual Menu Workshop code as a base framework.  You can distribute it free via electronic bulletin boards, user groups, and person to person. When distributed, all accompanying files (the ReadMe document, the program, etc.) are to distributed with the software without exception. The software is not to be included with any commercial software or any public domain/shareware package sold for profit without prior written consent from the author.

There's no technical support available for this software. However, your comments and bug reports are always welcome. Please send your e-mail to Hide Itoh <hide@pixture.com>.

Disclaimer

While the author of this software has made every effort to deliver a high quality product, The author does not guarantee that this product is free from defects.  The author is not responsible for any damage to the purchaser's computer system or data and in no event will I be responsible to the purchaser for any consequential, incidental, or indirect damages (including but not limited to damages for loss of business profits, business interruption, or loss of data) arising out of the use or inability to use this product, even if I have been advised of the possibility of such damages.  Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitations may not apply to you. The use of this software includes the complete agreement of this disclaimer.

Special Thanks To

Abracode Inc <www.abracode.com> and Contextual Menu Workshop 
	- nice framework for OS X cmm plugin development.